(function shop_head() {
	$(".zhen").each(function(i) {
		var shang = -i * 118;
		$(this).css("background-image", "url(http://img13.360buyimg.com/cms/jfs/t1651/242/1218992852/266820/a192273/55e6fb51N05a3b0d2.png)")
		$(this).css("background-position", "" + shang + "px -4px");
	});
	$(".fan").each(function(i) {
		var xia = -i * 118;
		$(this).css("background-image", "url(http://img13.360buyimg.com/cms/jfs/t1651/242/1218992852/266820/a192273/55e6fb51N05a3b0d2.png)")
		$(this).css("background-position", "" + xia + "px -128px");
	});
	$(".font_zhen").each(function(i) {
		var shang = -i * 118;
		$(this).css("background-image", "url(http://img14.360buyimg.com/cms/jfs/t2224/324/29498387/22359/7b79d9ad/55e6fb51N13ab6c8a.png)")
		$(this).css("background-position", "" + shang + "px -6px");
	});
	$(".font_fan").each(function(i) {
		var xia = -i * 118;
		$(this).css("background-image", "url(http://img14.360buyimg.com/cms/jfs/t2224/324/29498387/22359/7b79d9ad/55e6fb51N13ab6c8a.png)")
		$(this).css("background-position", "" + xia + "px -132px");
	});
	$(".font_fan").each(function(i) {
		$(this).click(function() {
			location.href = "shoplist.html";
		})
		$(".font_fan").eq(0).click(function(){
			location.href = "shop.html";
		})
		$(this).mouseover(function() {
			$(this).stop(true).animate({
				opacity: "1"
			}, 800);
			$(".fan:eq(" + i + ")").stop(true).animate({
				opacity: "1"
			}, 800);
		}).mouseout(function() {
			$(this).stop(true).animate({
				opacity: "0"
			}, 800);
			$(".fan:eq(" + i + ")").stop(true).animate({
				opacity: "0"
			}, 800);
		})
	});
	$(".font_icon_list1 span").each(function() {
		$(this).css("background-image", "url(img/shop/font_icon_list_all.png)");
	});
	$(".font_icon_list:eq(0) .list_zhen").each(function(i) {
		var shang = -i * 38;
		$(this).css("background-position", "0px " + shang + "px");
	});
	$(".font_icon_list:eq(0) .list_fan").each(function(i) {
		var shang = -i * 38;
		$(this).css("background-position", "-100px " + shang + "px");
	});
	$(".font_icon_list:eq(1) .list_zhen").each(function(i) {
		var shang = -i * 38;
		$(this).css("background-position", "0px " + shang + "px");
	});
	$(".font_icon_list:eq(1) .list_fan").each(function(i) {
		var shang = -i * 38;
		$(this).css("background-position", "-100px " + shang + "px");
	});
	$(".font_icon_list:eq(2) .list_zhen").each(function(i) {
		var shang = -(i + 5) * 38;
		$(this).css("background-position", "0px " + shang + "px");
	});
	$(".font_icon_list:eq(2) .list_fan").each(function(i) {
		var shang = -(i + 5) * 38;
		$(this).css("background-position", "-100px " + shang + "px");
	});
	$(".font_icon_list:eq(3) .list_zhen").each(function(i) {
		var shang = -i * 38;
		$(this).css("background-image", "url(img/shop/font_icon_list_pinpai.png)");
		$(this).css("background-position", "0px " + shang + "px");
	});
	$(".font_icon_list:eq(3) .list_fan").each(function(i) {
		var shang = -i * 38;
		$(this).css("background-image", "url(img/shop/font_icon_list_pinpai.png)");
		$(this).css("background-position", "-141px " + shang + "px");
	});
	$(".font_icon_list:eq(4) .list_zhen").each(function(i) {
		var shang = -i * 38;
		$(this).css("background-image", "url(img/shop/font_icon_list_guanzhu.png)");
		$(this).css("background-position", "10px " + shang + "px");
	});
	$(".font_icon_list:eq(4) .list_fan").each(function(i) {
		var shang = -i * 38;
		$(this).css("background-image", "url(img/shop/font_icon_list_guanzhu.png)");
		$(this).css("background-position", "-111px " + shang + "px");
	});
	$(".list_fan").each(function(i) {
		$(this).click(function() {
			location.href = "shoplist.html";
		})
		$(this).mouseover(function() {
			$(this).stop(true).animate({
				opacity: "1"
			}, 500);
		}).mouseout(function() {
			$(this).stop(true).animate({
				opacity: "0"
			}, 500);
		})
	});
	$(".font_icon_list").each(function() {
		var iconindex;
		$(this).parent().mouseover(function() {
			iconindex = $(this).index();
			$(this).children("ul").css("display", "block");
		}).mouseout(function() {
			$(this).children("ul").css("display", "none");
		})
		$(this).mouseover(function() {
			$(".fan:eq(" + iconindex + ")").stop(true).animate({
				opacity: "1"
			}, 800);
			$(".font_fan:eq(" + iconindex + ")").stop(true).animate({
				opacity: "1"
			}, 800);
		}).mouseout(function() {
			$(".fan:eq(" + iconindex + ")").stop(true).animate({
				opacity: "0"
			}, 800);
			$(".font_fan:eq(" + iconindex + ")").stop(true).animate({
				opacity: "0"
			}, 800);
		})
	})
})();